package com.anos.smsfun.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.anos.smsfun.R;
import com.anos.smsfun.activities.ScheduleActivity;

public class SettingFragment extends Fragment implements OnClickListener {

	private RelativeLayout l_BlockSMS;
	private RelativeLayout l_Schedule;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_setting, container,
				false);
		l_BlockSMS = (RelativeLayout) view.findViewById(R.id.l_blocksms);
		l_Schedule = (RelativeLayout) view.findViewById(R.id.l_schedule);

		l_BlockSMS.setOnClickListener(this);
		l_Schedule.setOnClickListener(this);
		return view;
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.l_schedule:
			Intent intent = new Intent(getActivity(), ScheduleActivity.class);
			getActivity().startActivity(intent);
			getActivity().overridePendingTransition(0, R.anim.exit_slide_left);
			break;

		default:
			break;
		}
	}

}
